/** 
* Descripttion:  Copyright (c) 2020 Sprocomm. All rights reserved.
* version:  V1.0 
* Author:  Sprocomm
* Date: 2020-10-26 09:47:03
* LastEditors:  Sprocomm
* LastEditTime: 2020-10-26 09:47:55
**/
#define PI 3.141592;
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
#include <iostream>

struct TPicRegion  
{
    unsigned char*     pdata;       
    long  		      	byte_width;    
    long        		width;         
    long        		height;        
};

#pragma pack( push,  2 )

struct bmpfileheader
{
	unsigned short type;
	unsigned int size;
	unsigned short resa;
	unsigned short resb;
	unsigned int offset;
};
#pragma pack( pop )

struct bmpinfoheader
{
	unsigned int size;
	long width;
	long height;
	unsigned short plane;
	unsigned short bitcount;
	unsigned int compress;
	unsigned int imgsize;
	long xdpm;
	long ydpm;
	unsigned int colornum;
	unsigned int colorimp;
};

void PicRotary2(TPicRegion* Dst,TPicRegion* Src,int Angle,double ZoomX,double ZoomY,double move_x,double move_y);
void PicRotary3(TPicRegion* Dst,TPicRegion* Src,int Angle);
int ImgOperate(int ActionFlag,int angle,int *CropCoorL,int *CropCoorR,char *OpenImage,char *NewIamge,double ZoomX,double ZoomY,double move_x,double move_y);
void PicCrop(TPicRegion* Dst,TPicRegion* Src,int *CropCoorL,int *CropCoorR);
void usage(void);
int String2Int(char *Sce,int Len,int *Result);